﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Depo.Kargo
{
    public partial class KargoZone : XForm
    {
        public KargoZone()
        {
            InitializeComponent();
        }

        private void KargoZone_Load(object sender, EventArgs e)
        {
            

            gridView1.Init("GetKargoZone", 1);
            gridView1.MakeColumnInvisible("KargoFirmaId", "CarrierId");
            gridView1.AddSummary();
            gridView1.BestFitColumns();

            btnKaydet.Enabled = ytk(113);
            btnKaydet.ItemClick += btnKaydet_ItemClick;
            //TODO: yukardaki combo'dan kargofirmaId seçilebilsin
            //zonelar aktarılsın/güncellensin
            //fiyatlar aktarılsın/güncellensin
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEditing();
            gridView1.Update("", "KargoZone");
        }
    }
}
